<template>
  <div id="app">
    <div id="nav"></div>
    <Nav class="head1"></Nav>
    <router-view></router-view>
    <Bottom class="bottom1"></Bottom>
  </div>
</template>
<script>
import Bottom from "./components/bottom/bottom.vue";
import Nav from "./components/nav/nav.vue";
export default {
  components: {
    Nav,
    Bottom,
  },
  data() {
    return {};
  },

  methods: {
    async getCake() {
      let res = await this.axios("/ljy/getCake");
      this.$store.commit("changecakeArr", res.data);
    },
    async getBread() {
      // console.log(111)
      let res = await this.axios("/wrx/test");
      let arr = res.data.ansor;
      // console.log(res)
      this.$store.commit("changebreadArr", arr);
    },
    async getSnack() {
      // console.log(111111);
      let res = await this.axios("/wrx/test");
      let arr = res.data.ansor2;
      // console.log(arr)
      this.$store.commit("changesnakeArr", arr);
    },
    async getParts() {
      let res = await this.axios("/wrx/test");
      this.$store.commit("changeparts", res.data.partsData1);
    },
  },
  mounted() {
    this.getCake(), this.getBread(), this.getSnack();

    this.getParts();
  },
};
</script>
<style lang="scss">
* {
  margin: 0;
  padding: 0;
}

html {
  /*隐藏滚动条，当IE下溢出，仍然可以滚动*/
  -ms-overflow-style: none;
  /*火狐下隐藏滚动条*/
  overflow: -moz-scrollbars-none;
}
div {
  margin: 0;
  text-align: left;
}

//谷歌适用
::-webkit-scrollbar {
  display: none;
}
</style>
